


<% if(!session[:user_id].nil?) %> 
	<div id = "tags">
	Profile Tags:
	<% for tag in @tags %>
   	 <% if(session[:user_id] == @user.id) then %> <%= link_to  tag.name  , :action => 'show' ,:controller => 'interests' ,:tag_id => tag.id , :user_id => @user.id %>  
   	 <% else %> 
    	<%=h tag.name %>
    <% end %> |
	<% end %>
	</div>	
 	<!-- <%= link_to_remote "recommended resources", 
 		:url => {:action => "recommendedIndex" , :controller => "resources" , :user_id => session[:user_id]},
 		:update => "contents"	%> -->
		<!-- <%= link_to "recommended resources", :action => "recommendedIndex" , :controller => "resources" , :user_id => session[:user_id] %> -->
		  <%= link_to "recommended resources", :action => "index" , :controller => "resources" , :user_id => session[:user_id] , :recommended => true %>
		 <br><br><%= link_to "Search", :controller=>'resources', :action=>'search' %> a resource!
		
		
	<!-- Favourites -->
	<h2>Your favorite resources:</h2>
	<% if @favourites != nil and @favourites.length > 0 then  %>
		<% @resources = @favourites %>
		<%= render :partial=>'resources/filteredIndex'  %>
		<% if @resources.length > 5 then %>
			<% puts "\n\n~~~"+@resources.length+"\n\n" %>
			<%= link_to 'More favorites...', '#' %>Link to add
		<% end %>
	<% end %>
		
		  
<% else %>
		<h2>Welcome!</h2>
		<h3>Do you know what is OSLP?</h3>
		
		<p>It stands for Open Source Learning Platform</p>
	<p>You can use it to share useful resources, look for them and keep them organized.</p>
	<p>Everything you find useful for your educational path or you think it may be useful for others' is welcome!</p>
<% end %>
</div>


